package com.gh.manager.train.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gh.manager.train.mapper.GhTrainUserMapper;
import com.gh.manager.train.domain.GhTrainUser;
import com.gh.manager.train.service.IGhTrainUserService;

/**
 * 训练人员Service业务层处理
 * 
 * @author andas
 * @date 2024-12-21
 */
@Service
public class GhTrainUserServiceImpl implements IGhTrainUserService 
{
    @Autowired
    private GhTrainUserMapper ghTrainUserMapper;

    /**
     * 查询训练人员
     * 
     * @param trainId 训练人员主键
     * @return 训练人员
     */
    @Override
    public GhTrainUser selectGhTrainUserByTrainId(Long trainId)
    {
        return ghTrainUserMapper.selectGhTrainUserByTrainId(trainId);
    }

    /**
     * 查询训练人员列表
     * 
     * @param ghTrainUser 训练人员
     * @return 训练人员
     */
    @Override
    public List<GhTrainUser> selectGhTrainUserList(GhTrainUser ghTrainUser)
    {
        return ghTrainUserMapper.selectGhTrainUserList(ghTrainUser);
    }

    /**
     * 新增训练人员
     * 
     * @param ghTrainUser 训练人员
     * @return 结果
     */
    @Override
    public int insertGhTrainUser(GhTrainUser ghTrainUser)
    {
        return ghTrainUserMapper.insertGhTrainUser(ghTrainUser);
    }

    /**
     * 修改训练人员
     * 
     * @param ghTrainUser 训练人员
     * @return 结果
     */
    @Override
    public int updateGhTrainUser(GhTrainUser ghTrainUser)
    {
        return ghTrainUserMapper.updateGhTrainUser(ghTrainUser);
    }

    /**
     * 批量删除训练人员
     * 
     * @param trainIds 需要删除的训练人员主键
     * @return 结果
     */
    @Override
    public int deleteGhTrainUserByTrainIds(Long[] trainIds)
    {
        return ghTrainUserMapper.deleteGhTrainUserByTrainIds(trainIds);
    }

    /**
     * 删除训练人员信息
     * 
     * @param trainId 训练人员主键
     * @return 结果
     */
    @Override
    public int deleteGhTrainUserByTrainId(Long trainId)
    {
        return ghTrainUserMapper.deleteGhTrainUserByTrainId(trainId);
    }
}
